package com.yzj.serviceimpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.yzj.dao.EmpDao;
import com.yzj.pojo.Emp;
import com.yzj.service.EmpService;
import org.springframework.stereotype.Service;

@Service
public class EmpServiceimpl extends ServiceImpl<EmpDao,Emp> implements EmpService {
    @Override
    public IPage<Emp> selectAll(Page<Emp> page) {
        return baseMapper.selectAll(page);
    }

    /*@Autowired
    private EmpDao ed;
    @Override
    public boolean insertemp(Emp em) {
        return ed.insertemp(em)>0;
    }

    @Override
    public List<Dept> selectdept() {
        return ed.selectdept();
    }

    @Override
    public Page<Emp> selectAll( int pageIndex,int pageSize) {
        Page<Emp> page= PageHelper.startPage(pageIndex,pageSize,"empno asc");
        ed.selectAll();
        return page;
    }

    @Override
    public Emp selectById(int empno) {
        return ed.selectById(empno);
    }

    @Override
    public boolean updateById(Emp emp) {
        return ed.updateById(emp)>0;
    }*/
}
